<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Navo Portable Library: navo/algorithm/crypto/symmetric/blowfish.c文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Navo Portable Library&#160;<span id="projectnumber">Ver 1.0.20120827</span></div>
   <div id="projectbrief">Provides generic platform independent facilities.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>数据结构</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>全局定义</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a> &#124;
<a href="#var-members">变量</a>  </div>
  <div class="headertitle">
<h1>navo/algorithm/crypto/symmetric/blowfish.c文件参考</h1>  </div>
</div>
<div class="contents">

<p>Blowfish.  
<a href="#_details">更多...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="blowfish_8h_source.html">blowfish.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="endian_8h_source.html">../../../port/endian.h</a>&quot;</code><br/>
</div>
<p><a href="blowfish_8c_source.html">浏览该文件的源代码。</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
宏定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a96d8855135de467bb21948d304ffc9aa"></a><!-- doxytag: member="blowfish.c::GET32_3" ref="a96d8855135de467bb21948d304ffc9aa" args="(x)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>GET32_3</b>(x)&#160;&#160;&#160;( (x)          &amp; (0xFF))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a02d032f13453de9389d1d0abac0a9288"></a><!-- doxytag: member="blowfish.c::GET32_2" ref="a02d032f13453de9389d1d0abac0a9288" args="(x)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>GET32_2</b>(x)&#160;&#160;&#160;(((x) &gt;&gt; ( 8)) &amp; (0xFF))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa344cc52317b3e2b81d16e21c55fda95"></a><!-- doxytag: member="blowfish.c::GET32_1" ref="aa344cc52317b3e2b81d16e21c55fda95" args="(x)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>GET32_1</b>(x)&#160;&#160;&#160;(((x) &gt;&gt; (16)) &amp; (0xFF))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adab7f1c855a56b0f6c1d3a4bd9d73931"></a><!-- doxytag: member="blowfish.c::GET32_0" ref="adab7f1c855a56b0f6c1d3a4bd9d73931" args="(x)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>GET32_0</b>(x)&#160;&#160;&#160;(((x) &gt;&gt; (24)) &amp; (0xFF))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><b>F</b>(x)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="accd3e977f70baa17680e33a6951add0b"></a><!-- doxytag: member="blowfish.c::ROUND" ref="accd3e977f70baa17680e33a6951add0b" args="(a, b, n)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ROUND</b>(a, b, n)&#160;&#160;&#160;(b) ^= esk[(n)]; (a) ^= F(b)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ace32845ae479a799fb2e6edeae24c3de"></a><!-- doxytag: member="blowfish.c::CR" ref="ace32845ae479a799fb2e6edeae24c3de" args="(a, b, c)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CR</b>(a, b, c)&#160;&#160;&#160;((((a) + (b)) &gt;= (c))? ((a) + (b) - (c)): ((a) + (b)))</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
函数</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6a89a47975615d05f750a2d1474cb0d9"></a><!-- doxytag: member="blowfish.c::__blowfish_encrypt_block" ref="a6a89a47975615d05f750a2d1474cb0d9" args="(uint32_t *esk, uint32_t *s_box, uint32_t *dst, uint32_t *src)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>__blowfish_encrypt_block</b> (uint32_t *esk, uint32_t *s_box, uint32_t *dst, uint32_t *src)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga32941eb2faef26ffb47eb4dfa4ca834b"></a><!-- doxytag: member="blowfish.c::__blowfish_set_key" ref="ga32941eb2faef26ffb47eb4dfa4ca834b" args="(blowfish_key *key, uint8_t *src_key, size_t cnt)" -->
NV_IMPL void&#160;</td><td class="memItemRight" valign="bottom"><b>__blowfish_set_key</b> (<a class="el" href="structblowfish__key.html">blowfish_key</a> *key, <a class="el" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2">uint8_t</a> *src_key, size_t cnt)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gade0f8eaf7b1a810c09a2d9c783bb9c4c"></a><!-- doxytag: member="blowfish.c::__blowfish_encrypt" ref="gade0f8eaf7b1a810c09a2d9c783bb9c4c" args="(uint32_t *esk, uint32_t *s_box, uint32_t *dst, uint32_t *src)" -->
NV_IMPL void&#160;</td><td class="memItemRight" valign="bottom"><b>__blowfish_encrypt</b> (uint32_t *esk, uint32_t *s_box, uint32_t *dst, uint32_t *src)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaecf59ac71fca3060f8cb45c1282e5c51"></a><!-- doxytag: member="blowfish.c::__blowfish_decrypt" ref="gaecf59ac71fca3060f8cb45c1282e5c51" args="(uint32_t *esk, uint32_t *s_box, uint32_t *dst, uint32_t *src)" -->
NV_IMPL void&#160;</td><td class="memItemRight" valign="bottom"><b>__blowfish_decrypt</b> (uint32_t *esk, uint32_t *s_box, uint32_t *dst, uint32_t *src)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
变量</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>PB</b> [18]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aad72827dcda00bf66f8161ef5a9d4032"></a><!-- doxytag: member="blowfish.c::SB" ref="aad72827dcda00bf66f8161ef5a9d4032" args="[1024]" -->
static const uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>SB</b> [1024]</td></tr>
</table>
<hr/><a name="_details"></a><h2>详细描述</h2>
<div class="textblock"><p>Blowfish. </p>
<p>Copyright (C) 2012-2022, Henry Kwok 郭弘扬. All rights reserved </p>

<p>在文件<a class="el" href="blowfish_8c_source.html">blowfish.c</a>中定义。</p>
</div><hr/><h2>宏定义文档</h2>
<a class="anchor" id="a203d5b93e4077aa273c7013964a31f9e"></a><!-- doxytag: member="blowfish.c::F" ref="a203d5b93e4077aa273c7013964a31f9e" args="(x)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define F</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment">(((s_box[GET32_0(x)      ]   + s_box[GET32_1(x) + 256]) ^ \
        s_box[GET32_2(x) + 512]) + s_box[GET32_3(x) + 768])
</pre></div>
<p>在文件<a class="el" href="blowfish_8c_source.html">blowfish.c</a>第<a class="el" href="blowfish_8c_source.html#l00294">294</a>行定义。</p>

</div>
</div>
<hr/><h2>变量文档</h2>
<a class="anchor" id="a7aa355b332f910ce1dc52d5760fe7381"></a><!-- doxytag: member="blowfish.c::PB" ref="a7aa355b332f910ce1dc52d5760fe7381" args="[18]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const uint32_t PB[18]<code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>初始化序列：</b><div class="fragment"><pre class="fragment"> {
    0x243f6a88UL, 0x85a308d3UL, 0x13198a2eUL, 0x03707344UL,
    0xa4093822UL, 0x299f31d0UL, 0x082efa98UL, 0xec4e6c89UL,
    0x452821e6UL, 0x38d01377UL, 0xbe5466cfUL, 0x34e90c6cUL,
    0xc0ac29b7UL, 0xc97c50ddUL, 0x3f84d5b5UL, 0xb5470917UL,
    0x9216d5d9UL, 0x8979fb1bUL,
}
</pre></div>
<p>在文件<a class="el" href="blowfish_8c_source.html">blowfish.c</a>第<a class="el" href="blowfish_8c_source.html#l00022">22</a>行定义。</p>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>数据结构</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>类型定义</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated at 2015年七月16日 星期四 12:00:38 for Navo Portable Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
